package progetto.bean;

import progetto.dto.UserDTO;
import progetto.entity.User;

import javax.ejb.Local;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 * Created by fede on 20/12/13.
 */
@Stateless
@Local
public class RegistrationBean implements Registration {

    @PersistenceContext
    private EntityManager entityManager;

    @Override
    public void storeData(UserDTO userDTO) {
        entityManager.persist(new User(userDTO));
    }
}
